A pulse width modulation (PWM) output type pressure sensor disclosed in JP-A-H11-237290 produces a PWM output having a pulse width associated with detected pressure. In the pressure sensor, an analog voltage outputted from a sensing element is converted to a 10-bit digital signal by an analog-to-digital (A/D) converter, and a PWM conversion circuit generates a PWM signal having a duty ratio varying from 2 percents (%) to 95% according to the digital signal. The PWM signal is outputted through an output circuit.
An A/D conversion time of the A/D converter must meet a requirement that a PWM signal having a minimum duty ratio of 2% can be produced within the A/D conversion time. In the pressure sensor, therefore, the number of times the A/D converter samples the analog voltage is fixed to three. However, even when a PWM signal having a duty ratio of 50% or more is produced, the A/D converter samples the analog voltage only three times despite that there is a margin of the A/D conversion time. As a result, the digital data outputted from A/D converter is poor in accuracy, and the pressure sensor may not accurately detect pressure.
The above problem can be overcome by increasing resolution of the digital data and by improving processing speed of the A/D converter and the PWM conversion circuit. However, the increase in resolution result in a reduction in a dynamic range, and such a high-performance A/D converter and PWM conversion circuit are costly.
Further, as shown in FIG. 9 of JP-A-H11-237290, in the pressure sensor, the duty ratio increases lineally with the detected pressure. In short, the resolution of the PWM signal is constant over the entire pressure range. Therefore, although there is often a requirement to change the resolution according to the detected pressure, the pressure sensor cannot satisfy the requirement.